package com.knife.oauth.security.customer.handler;

import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 登录成功处理器
 *
 * @author： 76875
 * @date： 2022/4/13 星期三 10:35
 * @description：
 * @modifiedBy：
 * @version: 1.0
 */
@Slf4j
public class KnifeAuthenticationSuccessHandler extends SavedRequestAwareAuthenticationSuccessHandler {

    @Override
    public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
                                        Authentication authentication) throws ServletException, IOException {
        log.info("认证成功");
        super.onAuthenticationSuccess(request, response, authentication);
    }
}
